﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          {
            name: '登陆',
            path: '/user/login',
            component: './User/Login',
          },
        ],
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: '欢迎页',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/admin',
    name: '权限',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/sub-page',
        name: '子页面',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: '表格',
    icon: 'table',
    path: '/list',
    component: './TableList',
  },
  {
    path: '/X6Cases',
    name: 'X6的使用',
    icon: 'crown',
    // access: 'canAdmin',
    // component: './Admin',
    routes: [
      {
        path: '/X6Cases/X6Case01',
        name: '案例1',
        icon: 'smile',
        component: './X6Pages/X6Case01',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/draggable',
    name: '拖拽',
    icon: 'crown',
    // access: 'canAdmin',
    // component: './Admin',
    routes: [
      {
        path: '/draggable/draggableCase01',
        name: 'beautiful-dnd',
        icon: 'smile',
        component: './Draggable/dnd',
      },
      {
        path: '/draggable/dndkit',
        name: 'dndkit',
        icon: 'smile',
        component: './Draggable/dndKit',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/canvas',
    name: '画图',
    icon: 'crown',
    // access: 'canAdmin',
    // component: './Admin',
    routes: [
      {
        path: '/canvas/imageDraw',
        name: '图片截图',
        icon: 'smile',
        component: './Canvas/ImageDraw',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
